from flask_script import Manager, Server
from app import app, db
from models import User,Book,Bookrack


manager = Manager(app)

manager.add_command('server', Server(host='127.0.0.1',port=5000))

@manager.shell
def make_shell_context():
    return dict(app=app, db=db, User=User,Book=Book,Bookrack=Bookrack)


if __name__ == "__main__":
    manager.run()